package com.market.service.impl;

import com.market.entity.BuyerCashFlow;
import com.market.mapper.BuyerCashFlowMapper;
import com.market.service.BuyerCashFlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * @ClassName BuyerCashFlowServiceImpl
 * @Description 买家资金流水
 * @Author pq
 * @Date 2022/3/29 19:12
 * @Version 1.0
 */
@Service
public class BuyerCashFlowImpl implements BuyerCashFlowService {

    @Autowired
    BuyerCashFlowMapper buyerCashFlowMapper;
    //增加买家资金流水
    @Override
    public boolean addBuyerCashFlow(BuyerCashFlow buyerCashFlow) {
        return buyerCashFlowMapper.addBuyerCashFlow(buyerCashFlow)>0;
    }

    //根据买家id查询买家所有资金流水
    @Override
    public List<BuyerCashFlow> queryAllBuyerCashFlow(int buyerId) {
        return buyerCashFlowMapper.queryAllBuyerCashFlow(buyerId);
    }
}
